package com.jvtd.eyl.di.module;


import android.app.Activity;
import android.support.v4.app.Fragment;

import com.jvtd.eyl.di.FragmentScope;

import dagger.Module;
import dagger.Provides;
import io.reactivex.disposables.CompositeDisposable;

/**
 * Created by Administrator on 2017/10/16.
 * Fragment
 */

@Module
public class FragmentModule
{
  private Fragment mFragment;

  public FragmentModule(Fragment fragment)
  {
    mFragment = fragment;
  }

  @Provides
  @FragmentScope
  Activity provideActivity()
  {
    return mFragment.getActivity();
  }

  @Provides
  @FragmentScope
  CompositeDisposable provideCompositeDisposable()
  {
    return new CompositeDisposable();
  }

}
